using System;

namespace Fadd.Net
{
    /// <summary>
    /// Received an object.
    /// </summary>
    public class ObjectEventArgs<T> : EventArgs where T : new()
    {
        private readonly T _object;

        /// <summary>
        /// Initializes a new instance of the <see cref="ObjectEventArgs&lt;T&gt;"/> class.
        /// </summary>
        /// <param name="value">The value.</param>
        public ObjectEventArgs(T value)
        {
            _object = value;
        }

        /// <summary>
        /// Gets received object
        /// </summary>
        public T Object
        {
            get { return _object; }
        }
    }
}